import * as echarts from 'echarts'
// 导入主题并注册
import ysTheme from '@/assets/theme/ys.json'
import ys2Theme from '@/assets/theme/ys2.json'
import { GlobalStore } from '@/stores/global'
import { storeToRefs } from 'pinia'

export const useTheme = () => {
	echarts.registerTheme('ys', ysTheme)
	echarts.registerTheme('ys2', ys2Theme)
	const { theme } = storeToRefs(GlobalStore())

	return { theme }
}
